//
//  RGMeAboutVC.m
//  RedGrass
//
//  Created by wuyine on 2019/1/30.
//  Copyright © 2019年 hongcaosp. All rights reserved.
//

#import "RGMeAboutVC.h"

@interface RGMeAboutVC ()

@end

@implementation RGMeAboutVC

- (void)viewDidLoad {
    [super viewDidLoad];
    [self showBackButton];
    self.customNavBar.title = @"关于";
    [self initUI];
}

- (void)initUI {
    
    UIImageView *icon = [[UIImageView alloc] initWithImage:IMAGE_NAMED(@"60")];
    
    NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
//    // app名称
//    NSString *app_Name = [infoDictionary objectForKey:@"CFBundleDisplayName"];
    // app版本
    NSString *app_Version = [infoDictionary objectForKey:@"CFBundleShortVersionString"];
    UILabel *version = [[UILabel alloc] init];
    version.text = [NSString stringWithFormat:@"版本号%@",app_Version];
    version.textColor = UICOLOR_WITH_RGBINT(0xffffff);
    version.font = FONT(customFontName, 16);
    
    UILabel *companyName = [[UILabel alloc] init];
    companyName.text = @"武汉众进聚合科技有限公司";
    companyName.textColor = UICOLOR_WITH_RGBINT(0xffffff);
    companyName.font = FONT(customFontName, 18);
    
    [self.customContentView addSubview:icon];
    [self.customContentView addSubview:version];
    [self.customContentView addSubview:companyName];
    
    [icon mas_makeConstraints:^(MASConstraintMaker *make) {
        make.size.mas_equalTo(CGSizeMake(60, 60));
        make.top.mas_equalTo(30);
        make.centerX.mas_equalTo(0);
    }];
    
    [version mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(0);
        make.top.equalTo(icon.mas_bottom).offset(30);
    }];
    
    [companyName mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(0);
        make.bottom.mas_equalTo(-30);
    }];
}
    
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
